package cn.itlight.basic.utils;


import lombok.Data;
/**
* @Description: TODO
* @Author: TomLiu
* @Version: 1.0
* @Date:  2022/6/24 10:07  
*/
@Data
public class AjaxResult {

    private Boolean success = true;

    private String message = "操作成功！";

    private Object resultObj;
    /* 
    * @Title: me
    * @Description: 自己创建一个对象
    * @Author: TomLiu
    * @Version: 1.0
    * @Date:  2022/6/24 10:07  
    * @Parameters: 
    * @Return 
    */
    public static AjaxResult me(){
        return new AjaxResult();
    }

    /* 
    * @Title: setSuccess
    * @Description: 方便链式编程
    * @Author: TomLiu
    * @Version: 1.0
    * @Date:  2022/6/24 10:07  
    * @Parameters: 
    * @Return 
    */
    public AjaxResult setSuccess(Boolean success){
        this.success = success;
        return this;
    }
    
    /* 
    * @Title: setMessage
    * @Description: 方便链式编程
    * @Author: TomLiu
    * @Version: 1.0
    * @Date:  2022/6/24 10:07  
    * @Parameters: 
    * @Return 
    */
    public AjaxResult setMessage(String message){
        this.message = message;
        return this;
    }
    public AjaxResult setResultObj(Object resultObj){
        this.resultObj = resultObj;
        return this;
    }
}
